'use strict';
//上传友链
exports.main = async (event, context) => {
	//event为客户端上传的参数
	let {name,cover,link} = event
  const db = uniCloud.database()
	const dbRes = await db.collection("link").add({
      "name":name,
      "link":link,
      "cover":cover
      })
	//返回数据给客户端
	return dbRes
};
